let conn = require("../utils/myconn.js");

exports.getAllCate = callback => {
  // 获取文章分类的信息
  let sql = `select * from categories`;
  conn.query(sql, (err, data) => {
    if (err) {
      callback(err);
    } else {
      callback(null, data);
    }
  });
};
